package com.example.zk2.adapter

import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.zk2.GlideUtils
import com.example.zk2.R
import com.example.zk2.entity.CateEntity

class CateAdapter(list: MutableList<CateEntity>):BaseQuickAdapter<CateEntity,BaseViewHolder>(R.layout.item_cate,list) {
    override fun convert(holder: BaseViewHolder, item: CateEntity) {
        holder.setText(R.id.cate_tv,item.category_name)
        GlideUtils.loadPic(context,item.category_icon!!,holder.getView(R.id.cate_iv))
    }
}